import rsa from './rsaAll'

const RSAEncrypt = (val, exponent, modulus) => {
  var rsaKey = new rsa.RSAKey()
  rsaKey.setPublic(rsa.b64tohex(modulus), rsa.b64tohex(exponent))
  return rsa.hex2b64(rsaKey.encrypt(val))
}

export default RSAEncrypt
